package com.bit.lotterySystem.service.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum UserIdentityEnum {
    ADMIN("ADMIN"),
    NORMAL("NORMAL");

    private final String massage;

//    UserIdentityEnum(String massage) {
//        this.massage = massage;
//    }
    public static UserIdentityEnum forName(String name) {
        for(UserIdentityEnum userIdentityEnum : UserIdentityEnum.values()) {
            if(userIdentityEnum.getMassage().equalsIgnoreCase(name)) {
                return userIdentityEnum;
            }
        }
        return null;
    }
}
